/*
 * @Description: 加入指定案卷按钮
 * @Author: Zzt
 * @Date: 2022-11-01 15:40:25
 * @LastEditTime: 2022-11-02 15:29:20
 */
import { Button } from 'antd';
import { useMemo, useState } from 'react';
import TransferFilesDialog from '../dialogs/TransferFilesDialog';

const TransferFiles = (props: any) => {
  const { selectItems } = props;
  const [visible, setVisible] = useState(false);

  return (
    <>
      <Button
        type="text"
        size="small"
        onClick={() => setVisible(true)}
        disabled={selectItems.length < 1}
      >
        转移到其它案卷
      </Button>
      {useMemo(
        () => (
          <TransferFilesDialog
            visible={visible}
            selectItems={selectItems}
            // outIn={list}
            // query={baseInfo.param}
            // info={upperInfo}
            onClose={() => {
              setVisible(false);
            }}
          />
        ),
        [visible, selectItems]
      )}
    </>
  );
};
export default TransferFiles;
